// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: wsfuyibing <682805@qq.com>
// Date: 2025-02-08

package errs

import "gitee.com/go-libs/runtime"

var (
	ErrCacheQueryFailed         = runtime.NewError(400, `缓存连接错误`)
	ErrDatabaseKeyNotConfigured = runtime.NewError(400, `数据连接错误`)
	ErrDatabaseConnectFailed    = runtime.NewError(400, `数据连接错误`)
	ErrDatabaseQueryFailed      = runtime.NewError(400, `数据检索错误`)
)

var (
	ErrRoutineNotConfigured = runtime.NewError(400, `微信小程序未配置`)
)

var (
	ErrErpClientNotConfigured = runtime.NewError(400, "ERP客户端未配置")
	ErrErpCustomerNotSync     = runtime.NewError(404, "ERP客户未同步")
	ErrErpGoodsNotSync        = runtime.NewError(404, "ERP商品未同步")
)

var (
	ErrGoodsAttributeNotSpecified = runtime.NewError(400, "商品属性错误")
	ErrGoodsCodeNotSpecified      = runtime.NewError(400, "商品编码为空")

	ErrOrderNotFound       = runtime.NewError(404, "订单记录不存在")
	ErrOrderSplit          = runtime.NewError(400, "订单已拆分")
	ErrOrderStatusNotFound = runtime.NewError(404, "订单状态记录不存在")

	ErrWechatUserNotFound = runtime.NewError(404, "微信用户记录不存在")
)
